<template>
  <el-dialog
    :title="title"
    :close-on-click-modal="false"
    :visible.sync="visible"
    :before-close="cancel"
    class="JNPF-dialog JNPF-dialog_center"
    lock-scroll
    width="40%"
  >
    <el-row :gutter="15" class="">
      <el-form
        ref="elForm"
        :model="dataForm"
        :rules="rules"
        label-width="100px"
      >

        <el-col :span="24">
          <el-form-item class="required" label="学校名称" prop="FSCHOOL">
            <el-input
              v-model="dataForm.FSCHOOL"
              placeholder="请输入"
              clearable
              :style="{ width: '100%' }"
            >
            </el-input>
          </el-form-item>
        </el-col>

        <el-col :span="24">
          <el-form-item label="课程名称">
            <el-input
              v-model="dataForm.FCATNAME"
              placeholder="请输入"
              clearable
              :style="{ width: '100%' }"
            >
            </el-input>
          </el-form-item>
        </el-col>

        <el-col :span="24">
          <el-form-item label="身份证号">
            <el-input
              v-model="dataForm.FCATNO"
              placeholder="请输入"
              clearable
              :style="{ width: '100%' }"
            >
            </el-input>
          </el-form-item>
        </el-col>

        <el-col :span="24">
          <el-form-item label="学生姓名">
            <el-input
              v-model="dataForm.FUSER"
              placeholder="请输入"
              clearable
              :style="{ width: '100%' }"
            >
            </el-input>
          </el-form-item>
        </el-col>

        <el-col :span="24">
          <el-form-item label="支付账单">
            <el-image
              style="width: 250px; height: 230px"
              :src="url"
              :fit="fit"></el-image>
          </el-form-item>
        </el-col>

        <el-col :span="24">
          <el-form-item label="支付时间">
            <el-input
              v-model="dataForm.FTIME"
              placeholder="请输入"
              clearable
              :style="{ width: '100%' }"
            >
            </el-input>
          </el-form-item>
        </el-col>


      </el-form>
    </el-row>
    <span slot="footer" class="dialog-footer">
      <!-- <el-button @click="cancel">取 消</el-button> -->
      <el-button  v-if="insertorupdate" type="primary" v-loading="loading">确 定</el-button>
      <el-button v-else type="primary"  v-loading="loading">确 定</el-button>
    </span>
  </el-dialog>
</template>
<script>
import jnpf from "@/utils/jnpf"
export default {
  props: {
    parelist: {
      type: Array,
      default: []
    },
  },
  data() {
    return {
        url:require('@/assets/images/me/pay.png'),
        title:"新增",
        dataForm:{
          FBILLNO: "Y241130001",
          FSRCNO:"Y241130001",
          FSCHOOL: "闵行春申小学",
          FCATNAME: "上海博物馆研学",
          FCATNO: "100009",
          FUSER: "刘阿斗",
          FTIME:"2024-12-03 19:12:03",
          FSEQNO: 1,
          FVISIBLE: 1,
          FIMAGE: null,
          FOPERATOR: "system",
          FUPDDATE: "2011-02-16T02:57:02.000+00:00"
        },
        rules: {
          FCATNO: [
                { required: true, message: '请输入校园编号', trigger: 'blur' },
            ],
            FCATNAME: [
                { required: true, message: '请输入校园名称', trigger: 'blur' },
            ],
        },
      fvisiblelist:[
        {id:"1",fullName:"是"},
        {id:"2",fullName:"否"},
      ],
      loading:false,
      visible:false,
      insertorupdate:true
    };
  },
  created() {
  },
  mounted() {},
  methods: {
    //
    init(id){
      this.dataForm.FCATNO= id || ''
        if(this.dataForm.FCATNO)
        {
            this.title="查看"
           this.insertorupdate=false;
        }
        else
        {
          this.insertorupdate=true;
            this.title="新增";
        }
        this.visible=true;
    },
    //
    cancel(){
        this.$refs.elForm.resetFields();
        this.visible=false;
    },
  },
};
</script>




